<template>
    <div style="margin-bottom: 60px;">
        <div style="margin: 10px;background-color: #fff;padding: 10px;" v-for="item in data">
            <a :href="/post-detail/ + item.id">{{item.label}}</a>
        </div>
    </div>
</template>
<script>
    export default {
        data() {
            return {
                data: []
            }
        },
        created() {
        },
        mounted() {
            this.getPost();
        },
        methods: {
            getPost() {
                let that = this;
                this.api.getPost().then(res => {
                    if (res.data) {
                        that.data = res.data;
                    }
                })
            }
        },
    }
</script>
<style scoped>


</style>
